<script id="t_leftmenu" type="text/template">
			<ul class="menu-lv1">
				{for(var i=0;i<data.length;i++){var item=data[i];}
					<li data-id="{-item.id}" {if(!item.children){}class="leaf"{}}><div class="icon {-item.icon}"></div><nobr>{-item.text}</nobr>
						<div class="itemv1-arrow"></div>
						{if(typeof(item.children)=="object"){}
							<ul class="menu-lv2 bg-c4">
							{for(var j=0;j<item.children.length;j++){var itemv2=item.children[j];}
								<li data-id="{-itemv2.id}" {if(!itemv2.children){}class="leaf"{}}><nobr>{-itemv2.text}</nobr>
									{if(typeof(itemv2.children)=="object"){}
										<span class="arrow"></span>
										<ul class="menu-lv3 bg-c4">
											{for(var k=0;k<itemv2.children.length;k++){var itemv3=itemv2.children[k];}
												<li data-id="{-itemv3.id}" title="{-itemv3.text}" class="leaf">
													<nobr>{-itemv3.text}</nobr>
												</li>
											{}}
										</ul>
									{}}
								</li>
							{}}
							</ul>
						{}}
					</li>
				{}}
			</ul>
</script>
<script id="t_catalog" type="text/template">	
		<div class="bg-c3">
			<div class="font-left font-c3">{-title}</div>
			<div class="font-right font-c2">
				{for(var i=0;i<levels.length;i++){}
					{if(i==levels.length-1){}
						<a class="current font-c1">{-levels[i]}</a>
					{}else{}{-levels[i]}/
					{}}
				{}}
			</div>
			<div style="clear:both;"></div>
		</div>
</script>
<script id="t_profile" type="text/template">	
		{var hasMenu=false;
		 if(typeof(menu)!="undefined"&&menu.length>0)hasMenu=true;}
		<div><img class="user-profile-icon" src="{-icon}"/></div>
		<a class="font-c2 user-profile-name" {if(!hasMenu){}style="cursor:default;"{}} title="{-name}">{-name}{if(hasMenu){}<span class="caret"></span>{}}</a>
		{if(hasMenu){}
		<ul class="profile-menu animated flipInY bg-c3" >
			{for(var i=0;i<menu.length;i++){var item=menu[i];}
				{if(typeof(item.type)=="string"){}
					{if($.trim(item.type.toLowerCase())=="separator"){}
						<li style="height:1px;border:none;border-top:1px solid #cecece;"></li>
						{continue;}
					{}}
                {}else if(typeof(item)=="string"&&item.indexOf("--")>=0){}
						<li style="height:1px;border:none;border-top:1px solid #cecece;"></li>
						{continue;}
				{}}
				<li class="font-c2" data-id="{-item.id}"><div class="profile-icon {-item.icon}"></div><nobr>{-item.text}</nobr></li>
			{}}
		</ul>{}}
</script>
<script id="t_headerbar" type="text/template">	
		{if(typeof(logo)!="undefined"){}
			{if(typeof(logo)=="string"){}
			<div class="top-logo" style="background-image:url({-logo});"></div>
			{}else if(typeof(logo)=="object"){}
			<div class="top-logo" style="{if(typeof(logo.url)=="string"){}background-image:url({-logo.url});{}}{if(typeof(logo.bgcolor)=="string"){}background-color:{-logo.bgcolor}{}}" title="{-logo.tip}"></div>
			{}}
		{}}
		{if(typeof(search)!="undefined"){}
			{if(typeof(search)=="string"){}
				<div class="adv-search-btn"></div>
				<div class="adv-search-wrapper">
					<input class="search-txt" placeholder="{-search}" />
					<div class="search-submit"></div>
				</div>
			{}else if(typeof(search)=="object"){}
				{if(typeof(search.advance)!="undefined"&&search.advance){}
					<div class="adv-search-btn"></div>
				{}}
				<div class="adv-search-wrapper">
					<input class="search-txt" placeholder="{-search.label||"Search..."}" />
					<div class="search-submit"></div>
				</div>
			{}}
		{}}
		{if(typeof(buttons)!="undefined"){}
			{for(var i=buttons.length-1;i>=0;i--){var button=buttons[i];}
			<div class="top-right-btn {-button.icon}" title="{-button.text}"></div>
		{}}
		{}}
		
</script>
<script id="tmpgrd" type="text/template">
		  	<h3 class="grid-title">{-title}</h3>
  			<p class="grid-subtitle">{-subtitle}</p>
 		 	<div class="buttons"><div class="btn bg-c1 font-c4">CLICK</div></div>
  			<table style="width:100%">
    			<thead><tr>
					{for(var i=0;i<cols.length;i++){var col=cols[i];}
					<th data-key="{-col.key}">{-col.text}</th>
					{}}
				</tr></thead>
    			<tbody>
      				<tr><td>a</td><td>b</td><td>c</td></tr>
      				<tr><td>a</td><td>b</td><td>c</td></tr>
    			</tbody>
  			</table>
</script>